package net.zjitc.exercise;

import net.zjitc.Student;

import java.util.ArrayList;
import java.util.List;


public class TestStream {

    private static List<Student> students = new ArrayList<>();

    static {
        students.add(new Student("1", "张三", 90));
        students.add(new Student("2", "李四", 20));
        students.add(new Student("3", "王五", 20));
        students.add(new Student("4", "赵六", 30));
        students.add(new Student("5", "田七", 10));
        students.add(new Student("6", "张三", 60));
        students.add(new Student("7", "夏兰", 50));
        students.add(new Student("8", "季水", 80));

    }

    // 以下练习用stream流来完成
    public static void main(String[] args) {
        // 1. 打印students里面的student的信息


        //2.  找出名字为田七的，并打印信息


        //3. 找出所有成绩为20的，并返回一个list


        //4. 把所有人按照成绩从高到低排序，打印排序后的结果


        //5. 把人员信息转化成一个List<Map<String,Object>> map的格式如下：
        /**
         * {
         *     "id":"1",
         *     "name":"李四"
         *     "score":"20"
         *
         *
         * }
         *

         *
         */


    }
}
